﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="History.ascx.cs" Inherits="Controls_History" %>
<%@ Register Src="Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<uc1:Pager ID="pagerTop" runat="server" Visible="false" />
<asp:Repeater ID="RepHistory" runat="server">
    <HeaderTemplate>
        <table style="border-collapse:collapse; margin-top:8px">
            <tr>
                <td class="headerTable" style="width:300px">Name</td>
                <td class="headerTable">Quantity</td>
                <td class="headerTable" style="width:120px; text-align:right">Unit Cost</td>
                <td class="headerTable" style="width:120px; text-align:right">Subtotal</td>
                <td class="headerTable" style="width:160px; text-align:right">Date Created</td>
            </tr>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class = '<%#(Container.ItemIndex%2==0?"":"odd")%>'>
             <td><a href='<%#DataAccess.Link.ToProduct(Eval("ProductID").ToString())%>' style="text-decoration:none";>
                        <%#Eval("ProductName")%></a>
             </td>
             <td style="text-align:center"><%#Eval("Quantity")%></td>
             <td style="text-align:right"><%#Eval("UnitCost", "{0:C}")%></td>
             <td style="text-align:right"><%#Eval("Subtotal", "{0:C}")%></td>
             <td style="text-align:right"><%#Eval("DateCreated", "{0:dd/MM/yyyy}")%></td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>
<uc1:Pager ID="pagerBottom" runat="server" Visible="false" />
